<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>管理员密码编辑</title>
<link href="<%=basePath%>skin/css/validform/style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="<%=basePath%>skin/js/jquery-1.9.1.min.js"></script>
<script type="text/javascript" src="<%=basePath%>skin/js/validform/Validform_v5.3.2_min.js"></script>
<script language="javascript">
	$().ready(function(){
		//验证
		var validform = $("#form1").Validform({
			btnSubmit:"#save",
			tiptype:3
		});
		validform.addRule([
			{
			    ele:"#pPassword",
			    datatype:"*",
			    nullmsg:"请输入当前密码！"
			},
			{
			    ele:"#nPassword",
			    datatype:"*",
			    nullmsg:"请输入新密码！"
			},
			{
			    ele:"#cfnPassword",
			    datatype:"*",
			    nullmsg:"请输入确认新密码！",
			    recheck:"nPassword"
			}
		]);
	 });
</script>
</head>

<body>
	<form id="form1" name="form1" method="post" action="<%=basePath%>admin/admin/updatepassword.shtml">
		<input type="hidden" name="id" value="${admin.id}" />
		<table width="98%" class="input tabContent">
			<tr bgcolor="#FAFAF1" height="22">
				<td class="tdRight">用户名：</td>
				<td class="tdLeft">${admin.username}</td>
			</tr>
			<tr bgcolor="#FAFAF1" height="22">
				<td class="tdRight">当前密码：</td>
				<td class="tdLeft"><input type="password" id="pPassword" name="pPassword"
					size="30" class="input"/></td>
			</tr>
			<tr bgcolor="#FAFAF1" height="22">
				<td class="tdRight">新密码：</td>
				<td class="tdLeft"><input type="password" id="nPassword" name="nPassword"
					size="30" class="input"/></td>
			</tr>
			<tr bgcolor="#FAFAF1" height="22">
				<td class="tdRight">确认新密码：</td>
				<td class="tdLeft"><input type="password" id="cfnPassword" name="cfnPassword"
					size="30" class="input"/></td>
			</tr>
		</table>
		<table width="98%">
			<tr bgcolor="#EEF4EA">
				<td height="36" colspan="10">
					<input type="button" value="确定" class="button" id="save" />
					<input type="button" value="返回" class="button" onclick="location.href='<%=basePath%>admin/admin/list.shtml'" />
				</td>
			</tr>
		</table>
	</form>
</body>
</html>
